﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;

namespace AppParams
{
	public class URLs
	{
		public static string BaseUrl
		{
			get { return ConfigurationManager.AppSettings["BaseUrl"]; }
		}

		public static string FbRedirectUrl(string id)
		{			
			var url = BaseUrl + "/pages/Social/Auth.aspx?from=graph";
			if(!string.IsNullOrEmpty(id))
				url+= "&id="+id;
			return url;
		}

		public static string TwRedirectUrl(string id)
		{
			var url = BaseUrl + "/pages/Social/Auth.aspx?from=twitter";
			if (!string.IsNullOrEmpty(id))
				url += "&id=" + id;
			return url;
		}

		public static string YtRedirectUrl(string id)
		{
			var url = BaseUrl + "/pages/Social/Auth.aspx?from=youtube";
			if (!string.IsNullOrEmpty(id))
				url += "&id=" + id;
			return url;
		}

		/// <summary>
		/// The url of the page that should recive the answer from Youtube after uploading a video.
		/// This Url is passed as a parameter in the Action of the upload form
		/// </summary>

		public static string YoutubeUploaderNextUrl(string id)
		{
				var q = string.Format("{0}/pages/Social/VideoPostUpload.aspx?{1}={2}", BaseUrl, Keys.qs_postID,id);
				return "nexturl=" + HttpUtility.UrlEncode(q);
		}


		public const string PersonalDashboard = "/Pages/Dashboard/Personal.aspx";

		public static string ConnectPageUrl(int accountID)
		{
			return "/pages/dashboard/connect.aspx?ID="+ accountID.ToString();
		}

		public static string MasterAccountPageUrl(int accountID)
		{
			return "/pages/dashboard/masterAccount.aspx?ID=" + accountID.ToString();
		}
        public static string MasterAccount_PostStatus(int accountID)
        {
            return "/Pages/Dashboard/MasterAccount/PostStatus.aspx?ID=" + accountID.ToString();
        }
		public static string MasterAccount_Edit(int accountID)
		{
			return "/Pages/Dashboard/MasterAccount/Edit.aspx?ID=" + accountID.ToString();
		}


        public static string Profile_PostStatus(int accountID)
        {
            return "/Pages/Dashboard/Agency/PostStatus.aspx?ID=" + accountID.ToString();
        }


		public static string AccountPageUrl(int accountID)
		{
			return "/pages/dashboard/account.aspx?ID=" + accountID.ToString();
		}

		public const string LoginUrl = "/Account/Login.aspx";
		public const string DashboardUrl = "/Pages/Dashboard/Dashboard.aspx";

	}

	public class Keys
	{
		public const string qs_postID = "pid";
	}

}